Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor the list of AI goals to be a list of enums, not a list of bit flags. This will allow additional goal types to be added above the current limit. The refactor involves removing all bitfield comparisons from goal modes, which was mostly done as part of WMC's ship type overhaul, but several comparisons still remained, especially in FRED and qtFRED.
Some type safety has also been added, especially to
ai_goal_type
. Ideallyai_goal_mode
would beenum class
, but that would be a very large change due to the need to add scoping to allAI_GOAL_*
tokens.In draft pending testing. Fixing #6466 will be a prerequisite to finish testing this PR, as both FRED and qtFRED are affected by the change in goal comparison.EDIT: see also #4306 which was a similar case of a bitfield being converted to use more than 32 values.